<div class="m-paramslist">
  <div class="list-body">
    <div class="list-row list-header">
      <div class="list-col"><em>实例名</em></div>
      <div class="list-col "><em>类名</em></div>
      <div class="list-col list-col-do"></div>
    </div>
    {#if !!params.length}
    {#if level == 0}
    {#list params as p}
    <div class="list-row">
      <div class="list-col "><em>{p.instanceName}</em></div>
      <div class="list-col"><em>{p.klassName}</em></div>
      <div class="list-col list-col-do"></div>
    </div>
    {/list}
    {#else}
    {#list params as p}
    {#if p.isAdding}
    <div class="list-row list-row-adding">
      <div class="list-col"><input type="text" data-enter={p_index} r-autofocus class="u-input"
                                   r-class={{"u-input-error":p.error}} r-model={p.instanceName}></div>
      <div class="list-col"><input type="text" data-enter={p_index} class="u-input" r-model={p.klassName}></div>
      <div class="list-col list-col-do"><a title="保存" on-click={this.update(p_index)}><i
        class="u-icon-yes-normal"></i><i class="u-icon-yes-hover"></i></a><a title="删除" on-click={this.remove(p_index)}><i
        class="u-icon-no-normal"></i><i class="u-icon-no-hover"></i></a></div>
    </div>
    {#else}
    <div class="list-row" on-mouseenter={p.hover
    = true} on-mouseleave={p.hover = false}>
    <div class="list-col "><input title={p.instanceName} type="text" readonly r-model={p.instanceName} class="u-input "
                                  data-active='required=true&id={p.id}&index={p_index}&actionType=input&name=instanceName&cache=jarmap&choseOnly=false'/>
    </div>
    <div class="list-col"><input title={p.klassName} type="text" readonly r-model={p.klassName} class="u-input "
                                 data-active='required=true&id={p.id}&index={p_index}&actionType=input&name=klassName&cache=jarmap'/>
    </div>
    <div class="list-col list-col-do"><i class="u-icon-delete-normal" r-class={{"f-dn-important":!p.hover}}
                                         on-click={this.remove(p_index)}></i></div>
  </div>
  {/if}
  {/list}
  {/if}
  {#else}
  <params-empty level={level} format={format} on-import={this.import($event)}></params-empty>
  {/if}
</div>
<div class="action-row" r-hide={level == 0}>
<span class="add" on-click={this.add()}><i class="u-icon u-icon-add-editor-normal"></i><i
  class="u-icon u-icon-add-editor-hover"></i><i class="u-icon u-icon-add-editor-pressed"></i></span>
</div>

</div>
